﻿// 进度条

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PlaneADJ
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            this.Location = new Point(400, 200);
            pgb.Style = ProgressBarStyle.Marquee;
            pgb.MarqueeAnimationSpeed = 20;
            this.TopLevel = true;
        }
        public void End(string sec)
        {
            pgb.Visible = false;
            label1.Text = "计算完成，共" + sec + "秒";
            Thread.Sleep(1000);
            this.Close();
        }
        public void Fail()
        {
            pgb.Visible = false;
            label1.Text = "近似坐标计算未完成,或平差失败！";
            Thread.Sleep(1000);
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
